package csc.segmentation;

import csc.main.Colors;
import csc.triangulation.Vector3d;
import java.util.List;

/**
 * Is used for detection of objects and calculation of centroids of detected objects.
 * @author Stanislau Dubrouski
 */
public interface CentroidsCalculator {

    static final int SUM_X_VALUES_POS = 0;
    static final int SUM_Y_VALUES_POS = 1;
    static final int SUM_Z_VALUES_POS = 2;
    static final int SUM_VALUES = 3;

    static final int X = 0;
    static final int Y = 1;
    static final int Z = 2;

    /**
     * Detects objects in given image and calculates centroid of every detected object. 
     * Centroids are calculated separately for every color channel.
     * @param colors color channels for detection
     * @param image input image
     * @return 2d list with calculated centroids. Top-level list contains 1D list for every color in colors list
     */
    public List<List<Vector3d>> computeCentroids(List<Colors> colors, int[][][] image);
}
